import { createApp } from 'vue'
import './style.css'
import App from './App.vue'

import * as ElementPlusIcons from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from "pinia"
import breadcrumb from "./layout/breadcrumb/breadcrumb.vue"
// pinia的持久化存储
import piniaPluginPersistedstate from "pinia-plugin-persistedstate"

import "./assets/global.less"
import "./assets/el-reset.less"

import "./utils/routerhooks.js"

import router from "./router/index"


import 'nprogress/nprogress.css'

// 使用持久化存储
let pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

let app = createApp(App)

app.use(ElementPlus)

for (const [key, component] of Object.entries(ElementPlusIcons)) {
    app.component(key, component)
  }

app.use(router)
app.component("breadcrumb",breadcrumb)

app.use( pinia )

app.mount('#app')
